fix: initial multichain core#1317
Conversation
…be any not unknown
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Bug: Error Handling: Validate Error Type Before Accessing Message
Multiple catch blocks in client.ts and index.ts directly access error.message (or err.message) without validating if the caught value is an Error object. Since JavaScript catch blocks can receive any type of value, this can lead to runtime errors if a non-Error value is caught.
packages/sdk-multichain/src/utis/rpc/client.ts#L139-L141
metamask-sdk/packages/sdk-multichain/src/utis/rpc/client.ts
Lines 139 to 141 in 7a99f2f
packages/sdk-multichain/src/store/index.ts#L15-L20
metamask-sdk/packages/sdk-multichain/src/store/index.ts
Lines 15 to 20 in 7a99f2f
packages/sdk-multichain/src/utis/rpc/client.ts#L59-L60
metamask-sdk/packages/sdk-multichain/src/utis/rpc/client.ts
Lines 59 to 60 in 7a99f2f
packages/sdk-multichain/src/utis/rpc/client.ts#L68-L69
metamask-sdk/packages/sdk-multichain/src/utis/rpc/client.ts
Lines 68 to 69 in 7a99f2f
Was this report helpful? Give feedback by reacting with 👍 or 👎
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1317 +/- ##
=======================================
Coverage 74.93% 74.93%
=======================================
Files 184 184
Lines 4513 4513
Branches 1105 1105
=======================================
Hits 3382 3382
Misses 1131 1131 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|



Explanation
This PR will be integrating the multi-chain core package, it does not yet fully integrate install modals and QRCode displaying. This will be implemented into the SDK once we have the playground merged.
I'd rather leave the multi-chain core as is and improve it in later PR's.
Added decent unitary test coverage for multichain and some minor changes in domain to make consuming this SDK easier.
Added session Management
Added Error Management
Added RPCClient with support for the ReadonlyRPC Calls as before but a much cleaner and isolated code.
Focusing on simplicity and strong separation of concerns
Checklist